#ifndef _COMMANDS_H
#define _COMMANDS_H
#include <stdio.h>
#define _XOPEN_SOURCE
#include <unistd.h>
#include <syslog.h>
#include <fcntl.h>
#include <time.h>
#include <grp.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <stdlib.h>
#include <error.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <string.h>
#include <errno.h>
#include <stdarg.h>
#include <dirent.h>
#include <pwd.h>
#include <shadow.h>
#include <errno.h>
#include <pwd.h>
#include "common.h"

int check_pass(const char *plainpw, const char *cryptpw);
int isroot();
int daemon_init(const char *pname, int facility);
int do_cmd_user(int fd, char *cmdline);
int do_cmd_pass(int fd, char *cmdline);
int do_cmd_syst(int fd, char *cmdline);
int do_cmd_pwd(int fd, char *cmdline);
int do_cmd_cwd(int fd, char *cmdline);
int do_cmd_delete(int fd, char *cmdline);
int get_list(const char *path, char *buf, int size);
int get_con_fd();
int do_cmd_list(int fd, char *cmdline);
int do_cmd_quit(int fd, char *cmdline);
int do_cmd_pasv(int fd, char *cmdline);
int do_cmd_mkd(int fd, char *cmdline);
int do_cmd_cdup(int fd, char *cmdline);
int myrmdir(const char *dir); 
int do_cmd_rmd(int fd, char *cmdline);
int do_cmd_port(int fd, char *cmdline);
int do_cmd_noop(int fd, char *cmdline);
int do_cmd_stor(int fd, char *cmdline);
int do_cmd_retr(int fd, char *cmdline);
int do_cmd_rnfr(int fd, char *cmdline);
int do_cmd_rnto(int fd, char *cmdline);
int do_cmd_type(int fd, char *cmdline); 

char passwd[USERNAMEMAX];
char username[USERNAMEMAX];

#endif
